package gui;

import java.io.Serializable;

public class Point implements Serializable {

	private static final long serialVersionUID = 8219279732894297926L;

	public double x, y;

	public Point(double x, double y) {
		this.x = x;
		this.y = y;
	}

	public double distanceTo(double gridX, double gridY) {
		return Math.sqrt((x - gridX) * (x - gridX) + (y - gridY) * (y - gridY));
	}

	public double distanceTo(Point p) {
		return distanceTo(p.x, p.y);
	}
}
